<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class gallery extends CI_Controller {
	function __construct()
	{
		parent::__construct();
		//if($this->router->class != "news" and $this->router->method !="search") $this->session->unset_userdata("search");
		$this->load->model('Mgallery_cat');
		$this->load->model('Mgallery');
		$this->lang->load('home', 'vietnamese');
	}
	function index()
	{
		$lang = 'vn';
		if($lang == 'en')
		{
			$lang = '2';
		}
		else
			$lang = 1;
		$data['title']='Thư viện ảnh';
		$data['main']= 'gallery';
		$data['result'] =$this->Mgallery_cat->get_catalbum();
		$data['others'] ='';
		$this->load->view('template/index_info',$data);
	}
	function detail($catID)
	{
		$lang = 'vn';
		if($lang == 'en')
		{
			$lang = '2';
		}
		else
			$lang = 1;
		$data['title']='Thư viện ảnh';
		$data['main']= 'gallery';
		$data['result'] =$this->Mgallery->get_detail_cat($catID);
		$data['others'] ='';
		$this->load->view('template/index_gallery',$data);
	}
}
/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */